fix: hide ECharts toolbox in sandbox metrics chart#460
Conversation
Co-Authored-By: ben@e2b.dev <ben@e2b.dev>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
LGTM, simple 3-line fix to hide the ECharts toolbox following the same pattern as other metrics charts.
Extended reasoning...
Overview
This PR adds a 3-line toolbox: { show: false } option to the ECharts config in monitoring-sandbox-metrics-chart.tsx. The ToolboxComponent is registered (required for brush/zoom functionality), but the toolbox UI itself needs to be explicitly hidden — which Webpack was rendering visibly while Turbopack happened to hide due to different module init order. The fix mirrors the established pattern already used in team-metrics-chart and compute-usage-chart.
Security risks
None. This is a purely visual/UI fix that disables a built-in ECharts UI element. No data flow, auth, or input handling is touched.
Level of scrutiny
Low. The change is a tiny, mechanical config tweak in a frontend chart component, matching an existing convention in sibling files. It cannot affect behavior beyond hiding the toolbox icons.
Other factors
No bugs were flagged by the bug hunting system. The PR description clearly explains the root cause (Webpack vs Turbopack module init order) and the fix is a one-line addition. No outstanding reviewer comments to address.
Summary
The sandbox detail monitoring chart (
SandboxMetricsChart) registersToolboxComponent(required for brush/zoom), but unliketeam-metrics-chartandcompute-usage-chart, it was missingtoolbox: { show: false }in its ECharts option. This caused the toolbox icons (brush, zoom, reset, etc.) to render visibly in the top-right corner of the chart.With Turbopack this defaulted to hidden due to different module initialization order, but Webpack renders the toolbox visibly.
return { backgroundColor: 'transparent', animation: false, + toolbox: { show: false }, brush: isMobile ? undefined : { ... },Link to Devin session: https://app.devin.ai/sessions/26cc0135d9e24aaa87881e8d7e2069cb